package org.softmed.rest.editor;

import java.awt.BorderLayout;
import java.awt.Color;

import javax.swing.BorderFactory;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPanel;

import org.softmed.rest.editor.commons.SwingUtil;

public class UpdateFrame extends JDialog {

	JLabel label = new JLabel("Connecting to server...");

	public UpdateFrame() {
		super();
		setTitle("Updating");
		setModal(true);
		setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);

		// get
		JPanel contents = (JPanel) getContentPane();
		contents.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
		contents.add(label, BorderLayout.NORTH);

		SwingUtil.setSize(label, 300, 100);

	}

	public void display() {
		pack();
		setLocationRelativeTo(null);
		setVisible(true);
	}

	public JLabel getLabel() {
		return label;
	}

	public void setLabel(JLabel label) {
		this.label = label;
	}

}
